package com.yunchang.springboot.mapper.base.database;

import com.yunchang.springboot.models.base.database.BaseDatabase;
import org.apache.ibatis.annotations.Mapper;

/**
 * @author Administrator
 */
@Mapper
public interface BaseDatabaseMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(BaseDatabase record);

    int insertSelective(BaseDatabase record);

    BaseDatabase selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(BaseDatabase record);

    int updateByPrimaryKey(BaseDatabase record);

    /**
     * 新增数据并返回id
     * @param baseDatabase
     * @return
     */
    int insertSelectiveReturnId(BaseDatabase baseDatabase);

    /**
     * 根据sellerId获取databaseName
     * @param sellerId
     * @return
     */
    String selectDatabaseNameBySellerId(String sellerId);
}